#define _CRT_SECURE_NO_WARNINGS 1
#include <iostream>

using namespace std;

int main()
{
	int n;
	string s;
	cin >> s;
	bool flag = true;
	for (int i = 0; i < n - 1; i++)
	{
		if (s[i] > s[i + 1])
		{
			cout << "YES" << endl;
			cout << i + 1 << ' ' << i + 2 << endl;
			flag = false;
			break;
		}
	}
	if (flag)
		cout << "NO" << endl;
	return 0;
}